package jp.tkym.labs.util.beankey;

public class KeyGeneratorTestBean {
	private int intKey;
	private String stringKey;
	private Integer integerKey;
	private String value;
	public int getIntKey() {
		return intKey;
	}
	public void setIntKey(int intKey) {
		this.intKey = intKey;
	}
	public String getStringKey() {
		return stringKey;
	}
	public void setStringKey(String stringKey) {
		this.stringKey = stringKey;
	}
	public Integer getIntegerKey() {
		return integerKey;
	}
	public void setIntegerKey(Integer integerKey) {
		this.integerKey = integerKey;
	}
	public String getValue() {
		return value;
	}
	public void setValue(String value) {
		this.value = value;
	}
	
	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + intKey;
		result = prime * result
				+ ((integerKey == null) ? 0 : integerKey.hashCode());
		result = prime * result
				+ ((stringKey == null) ? 0 : stringKey.hashCode());
		result = prime * result + ((value == null) ? 0 : value.hashCode());
		return result;
	}
	
	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		KeyGeneratorTestBean other = (KeyGeneratorTestBean) obj;
		if (intKey != other.intKey)
			return false;
		if (integerKey == null) {
			if (other.integerKey != null)
				return false;
		} else if (!integerKey.equals(other.integerKey))
			return false;
		if (stringKey == null) {
			if (other.stringKey != null)
				return false;
		} else if (!stringKey.equals(other.stringKey))
			return false;
		if (value == null) {
			if (other.value != null)
				return false;
		} else if (!value.equals(other.value))
			return false;
		return true;
	}
}
